<?
$res = mysql_query("SELECT * from modules");
while($r = mysql_fetch_array($res)){
?>
<div id="module<?=$r['module']?>" onclick="do__module('<?=$r['e']?>')" class="dvModule shadowMe2" style="background: url(<?=$r['img']?>) #666666 no-repeat center center">
    <div class="title"><?=$r['name']?></div>
</div>
<?
}
?>